package com.vitabuybuy.tv.ui.mine.talent.usercenter.adapter

import androidx.recyclerview.widget.RecyclerView
import com.vitabuybuy.tv.R
import com.vitabuybuy.tv.databinding.ItemLogistics1Binding
import com.vitabuybuy.tv.databinding.ItemTalentCaseBinding
import com.vitabuybuy.tv.dto.CaseBean
import com.vitabuybuy.tv.dto.TalentUserInfoDto
import com.library.common.base.BindRecycAdapter

class TalentCaseAdapter : BindRecycAdapter<ItemTalentCaseBinding, CaseBean>() {
    override fun onBindViewHolder(
        mBinding: ItemTalentCaseBinding,
        itemData: CaseBean,
        holder: RecyclerView.ViewHolder,
        position: Int
    ) {
        mBinding.itemData = itemData
        mBinding.btnEdit.setOnClickListener {
            onEditCaseListener.invoke(position)
        }
        mBinding.btnDelete.setOnClickListener {
            onDeleteCaseListener.invoke(position)
        }
    }

    override fun normalViewId(viewType: Int): Int {
        return R.layout.item_talent_case
    }

    lateinit var onEditCaseListener: (position: Int) -> Unit
    lateinit var onDeleteCaseListener: (position: Int) -> Unit
}
